<%--
 *  File:   FileRuleConfigHeader.jsp
 *  Desc: 
 *
 *  Date	  :	 2010/07/22        		    
 *  Author	:  banshang		
 *
 *  Copyright (C) 2000 - 2007 Oval Technologies, Inc.
 *  All rights reserved.
 *
 *  This software is the confidential and proprietary information of Oval
 *  Technologies, Inc. ("Confidential Information").  You shall not
 *  disclose such Confidential Information and shall use it only in
 *  accordance with the terms of the license agreement you entered into
 *  with Oval.
--%>
<%
  //init param
  String privilegeCode = "E0511";
  String strModuleName = "CFM";
  String contextPath = request.getContextPath();
%>
<%@ include file="/inc/CommonHeader.inc" %>

<html>
<head>
<title>FileRuleConfigHeader</title>
<PageFlow:CheckPageFlow pageName="p_fileruleconfigheader"/>
<%@ include file="/inc/CatchError.inc" %>

<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<link rel="stylesheet" href="<%=contextPath%>/css/<%= strLanguageCode %>/main.css" type="text/css">
<script language="JavaScript" src="<%=contextPath%>/css/<%= strLanguageCode %>/script.js"></script>
<script language="JavaScript" src="<%=contextPath%>/js/ScriptLib.js"></script>
<script language="JavaScript" src="<%=contextPath%>/js/PopWindow.js"></script>
<%
  String strId="";
  HashMap hmTmp=(HashMap)pageContext.getAttribute("fileruleinfo");
  if(hmTmp==null)
    hmTmp=new HashMap();
  if(hmTmp.get("fileruleconfigid")!=null)
    strId=((Integer)hmTmp.get("fileruleconfigid")).toString();
  
%>

<script language="JavaScript">
var isnewfileruleconfig=null;
function checkfileruleconfigid(){
	var fileruleconfigid = parent.down.cform.fileruleconfigid;
	if(fileruleconfigid != null && fileruleconfigid.value != null){
		isnewfileruleconfig=true;
	}else{ 
		isnewfileruleconfig = false;
	}
}

function clicked(obj)
{ 
  var url = "";
  var params = '&fileruleconfigid=<custom:write name="fileruleinfo" property="fileruleconfigid"/>&displayflag=<%=request.getParameter("displayflag")%>';
 	if(isnewfileruleconfig == null){
 		checkfileruleconfigid();
 	}
 	if(isnewfileruleconfig){
	  if (obj.id == "A01")
		  url = "FileRuleConfigMainEdit.jsp?<%= OvalTools.randomURL() %>"+params ;
	  else if (obj.id == "A02")
	    url = "FileNameRuleEdit.jsp?<%= OvalTools.randomURL() %>" + params;
	  else if (obj.id == "A03")
	    url = "FilePathConfigEdit.jsp?<%= OvalTools.randomURL() %>" + params;
	  else if (obj.id == "A04")
	    url = "ColumnMappingEdit.jsp?<%= OvalTools.randomURL() %>" + params;
	    else if (obj.id == "A05")
	    url = "FileNameErrActionEdit.jsp?<%= OvalTools.randomURL() %>" + params;
	    else if (obj.id == "A06")
	    url = "EarlyCheckRules.jsp?<%= OvalTools.randomURL() %>" + params;
	  parent.down.location.href=url;
	  return true;
  }
  	alert("<%= message.getMessageDesc("SAVE_MAIN_INO_FIRST") %>");
   	return false;
}

function page_back(){
parent.location.href="FileRuleConfigSummary.jsp";
}




</script>
</head>
<body leftmargin="0" topmargin="0" marginwidth="0" marginheight="0" >

<%--	form elements	--%>

<form name="cform" method="post" action="<%=contextPath%>/Dispatcher">
  	<input type="hidden" name="pagename" value="p_fileruleconfigheader">
  	<input type="hidden" name="actionname">
    

<div id=div1>

<%--	header title	--%>

<table width="100%" cellspacing="0" cellpadding="0">
  <tr>
    <td class="summary_top"></td>
    </tr>
   <tr>
    <td class="td_center"><span class="title-big-b-center"><%= label.getLabelName("L_FileNameRuleConfig")%></span></td>
  </tr>
   </table>

  <table width="100%" border="0" cellspacing="0" cellpadding="0" style="position:absolute;bottom:0;">
  <tr>
    <td class="summary_top" ></td>
  </tr>


<%--	header descriptions	--%>

	<tr>
    <td class="td_right">
      <table width="100%" border="0" cellspacing="0" cellpadding="0">
        <tr>
          <td><span class="b"><%= label.getLabelName("L_FileNameRuleCode") + label.getLabelName("L_Colon") %><custom:write property="fileruleconfigcode" name="fileruleinfo"/></span></td>
        </tr>
      </table>
    </td>
  </tr>


<%--	all tabs	--%>  
  <%
 		Vector vec = new Vector();
 		HashMap tabHash = new HashMap();

 		tabHash.put("id","A01");
 		tabHash.put("label","L_BasicInfo");
 		vec.add(tabHash);
    
    	tabHash = new HashMap();
    	tabHash.put("id","A02");
 		tabHash.put("label","L_FileNameRule");
 		vec.add(tabHash);
 		
    	//tabHash = new HashMap();
    	//tabHash.put("id","A03");
 		//tabHash.put("label","L_FilePathRule");
 		//vec.add(tabHash);
 		
    	//tabHash = new HashMap();
    	//tabHash.put("id","A04");
 		//tabHash.put("label","L_ColumnMapping");
 		//vec.add(tabHash);
 		
 		//tabHash = new HashMap();
    	//tabHash.put("id","A05");
 		//tabHash.put("label","L_FileNameErrAction");
 		//vec.add(tabHash);

 		//tabHash = new HashMap();
    	//tabHash.put("id","A06");
 		//tabHash.put("label","L_Early_Check_Rules");
 		//vec.add(tabHash);
   
 	%>
  <tr>
    <td>
     	<custom:tab vecAttr="<%=vec%>" defaultID="A01" privilegeCode="E0511" />
    </td>
  </tr>

</table>
</div>

</body>
</html>